% 
% Author: Vasyl Mykhalchuk 
%
function [ ] = saveData( filePath, fpVert, fpVal )

[fid, Msg] = fopen(filePath, 'wt');
if ( fid == -1 )
    error(Msg);
end%if

[nX, nY] = size(fpVert);
fprintf(fid, '%d\n', nX);
for i = 1:nX
    vertexId = fpVert(i, 1);
    fprintf(fid, '%d %5.3f\n', vertexId, fpVal(vertexId, 1) );
end%for

fclose(fid);

end%function 


